package affiliates

import (
	"context"
	"github.com/gogf/gf/v2/frame/g"
	"strings"
)

var (
	callbackEndpoint string
)

func GetCallbackEndpoint() string {
	if callbackEndpoint == "" {
		callbackEndpoint = g.Config().MustGet(context.Background(), "app.affiliates.callbackEndpoint").String()
		callbackEndpoint = strings.Trim(callbackEndpoint, "/")
	}
	return callbackEndpoint
}
